﻿<div class="text-center">
    <MButton Dark
             Color="red darken-2"
             OnClick="@Show">
        Open Snackbar
    </MButton>

    <MSnackbar @bind-Value="_show"
               MultiLine
               Action="Close">
        Hello, I'm a snackbar
    </MSnackbar>
</div>

@code{
    private bool _show;

    private void Show()
    {
        _show = true;
    }

}